#pragma once
#include <memory>
#include <array>
#include <SFML/System/Vector2.hpp>
#include <SFML/Graphics/Color.hpp>
#include <nice2d/entity.h>

class AttributeChart : public Entity
{
public:
    AttributeChart();
    ~AttributeChart();
public:
    void setChartBackground(const sf::Color &background);
    sf::Color getChartBackground()const;

    void setFont(const std::string &file, int32_t size);
    void setLables(const std::array<sf::String, 5> &labels);

    void setData(const std::array<int32_t, 5> &attributes);
private:
    void onSizeChanged()override;
    void onPositionChanged() override;
    void onUpdateEntity(float deltaTime) override;
    void onDrawNode(sf::RenderTarget &target, sf::RenderStates states) const override;
private:
    std::unique_ptr<class AttributeChartData> data;
};
